<?php
namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;

use App\Service\Rpc\Crm;

use Illuminate\Http\Request;

class TestController extends Controller
{

    /**
     * test
     */
    public function test ( Request $request ){

        $sync_goods = new Crm();

        $args_array  = [
//            'mobilenum' => 15755104415,
            'mobile'=>15755104415,
            'cardNo'=>'6666171010000001',
//            'openId' => '123456',
//    'custID'=> '15755104421',


//    'mobile'=> '15162109684',
//          'cardNo'=> '300000203402',
            'custname'=> 'lu',
            'sexy'=> '1',
            'birthday'=> '1990-11-05',
//            'address'=> '1安徽省合肥市蜀山区',
//            'email'=> '1114222229@qq.com',
//          'mobilenum'=> '15755104415',
//          'openId' => '123456',
//        'identityCard'=>'340823199011291218',
            //    'custID'=>'5265165161',
//        'birthday'=>'1990-11-29',
//        'mobilenum'=> '15755104421',
            'points'=>1,
        'amount'=>1 ,
            'tranId'=>'22221112221222213552',
            'remark'=> '扣减积分备注',
//        'page' => 1 ,   //页码
//        'pageSize' => 10,
//        'rp' => 16,
            //    'pwd' => '',
//        'sexy' => '1',
            //    'QQ' => 1149458073,
            //    'custname' => '测试1',
            //    'provinceName' => '安徽省',
            //    'cityName' => '合肥市',
            //    'districtName' => '蜀山区',
//        'address' => '安徽省合肥市蜀山区长江西路103',
            //    'mallCode' => '0112'
            //    're' => '0112'
            //    're' => '0112'
            //    're' => '0112'
//        'new_password' => '123456',
//        'password' => '123456',
        ];

//$res = $sync_goods->bindCard($args_array);
//$res = $sync_goods->pointsQuery($args_array);
//$res = $sync_goods->pointsAdd($args_array);
//$res = $sync_goods->pointsReduction($args_array);
//$res = $sync_goods->pointsLogs($args_array);
//$res = $sync_goods->accountLogs($args_array);
//$res = $sync_goods->recharge($args_array);
//$res = $sync_goods->accountQuery($args_array);
//$res = $sync_goods->consumption($args_array);
//$res = $sync_goods->customerQuery($args_array);
//$res = $sync_goods->queryByMobi   lenum($args_array);
//$res = $sync_goods->queryByIdCard($args_array);
$res = $sync_goods->customerEdit($args_array);
//$res = $sync_goods->queryByCardNo($args_array);
//$res = $sync_goods->getCustInfo($args_array);
//$res = $sync_goods->getStoreByCode( '0112' );
//$res = $sync_goods->queryCardInfo( $args_array );
//$res = $sync_goods->searchCustRank( $args_array );
//$res = $sync_goods->saveError( $args_array );
//$res = $sync_goods->checkCard( $args_array );
//$res = $sync_goods->changePassword( $args_array );

        error_log(var_export( $res,true ));

        return response()->json($res);

    }



}